import request from '@/utils/request'

export function createJs() {
  return request({
    url: '/api/reset-js-html',
    method: 'get'
  })
}

export function createHtml() {
  return request({
    url: '/admin/user/gen_channel_html.html',
    method: 'post'
  })
}

export function fetchLink() {
  return request({
    url: '/settle/index/get_channel_link_confg',
    method: 'post'
  })
}

export function delLink(data) {
  return request({
    url: '/settle/index/channel_link_del',
    method: 'post',
    data
  })
}

export function updateLink(data) {
  return request({
    url: '/settle/index/channel_link_confg',
    method: 'post',
    data
  })
}
// 修改pull js
export function updatePullJs(data) {
  return request({
    url: '/api/update/pull',
    method: 'post',
    data
  })
}

// 清除缓存
export function clearCache() {
  return request({
    url: '/api/clear/cache',
    method: 'get'
  })
}